﻿
@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

@using (Ajax.BeginForm("GetChatMessages", "Chat", new AjaxOptions { HttpMethod = "POST", InsertionMode = InsertionMode.Replace, UpdateTargetId = "chatMessages" }))
{
    <input type="submit" value="Update" />
}

@using (Ajax.BeginForm("AddChatMessage", "Chat", new AjaxOptions { HttpMethod = "POST", InsertionMode = InsertionMode.Replace, UpdateTargetId = "chatMessages" }))
{
    <input type="text" name="m" />
    <input type="submit" value="send" />
}  

<div id="chatMessages">

</div>